package com.brainhealth.customer.service.impl;

import java.util.List;
import com.brainhealth.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brainhealth.customer.mapper.SysLoginPushMapper;
import com.brainhealth.customer.domain.SysLoginPush;
import com.brainhealth.customer.service.ISysLoginPushService;

/**
 * 登录推送任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-08
 */
@Service
public class SysLoginPushServiceImpl implements ISysLoginPushService 
{
    @Autowired
    private SysLoginPushMapper sysLoginPushMapper;

    /**
     * 查询登录推送任务
     * 
     * @param id 登录推送任务主键
     * @return 登录推送任务
     */
    @Override
    public SysLoginPush selectSysLoginPushById(Long id)
    {
        return sysLoginPushMapper.selectSysLoginPushById(id);
    }

    /**
     * 查询登录推送任务列表
     * 
     * @param sysLoginPush 登录推送任务
     * @return 登录推送任务
     */
    @Override
    public List<SysLoginPush> selectSysLoginPushList(SysLoginPush sysLoginPush)
    {
        return sysLoginPushMapper.selectSysLoginPushList(sysLoginPush);
    }

    /**
     * 新增登录推送任务
     * 
     * @param sysLoginPush 登录推送任务
     * @return 结果
     */
    @Override
    public int insertSysLoginPush(SysLoginPush sysLoginPush)
    {
        sysLoginPush.setCreateTime(DateUtils.getNowDate());
        return sysLoginPushMapper.insertSysLoginPush(sysLoginPush);
    }

    /**
     * 修改登录推送任务
     * 
     * @param sysLoginPush 登录推送任务
     * @return 结果
     */
    @Override
    public int updateSysLoginPush(SysLoginPush sysLoginPush)
    {
        sysLoginPush.setUpdateTime(DateUtils.getNowDate());
        return sysLoginPushMapper.updateSysLoginPush(sysLoginPush);
    }

    /**
     * 批量删除登录推送任务
     * 
     * @param ids 需要删除的登录推送任务主键
     * @return 结果
     */
    @Override
    public int deleteSysLoginPushByIds(Long[] ids)
    {
        return sysLoginPushMapper.deleteSysLoginPushByIds(ids);
    }

    /**
     * 删除登录推送任务信息
     * 
     * @param id 登录推送任务主键
     * @return 结果
     */
    @Override
    public int deleteSysLoginPushById(Long id)
    {
        return sysLoginPushMapper.deleteSysLoginPushById(id);
    }
}
